export default async function({ strength, direction }) {
  await new Promise(resolve => setTimeout(resolve, 2000));
  console.log(`[KPMS] 设置磁场: ${strength} T ${direction}方向`);
  return { actualStrength: strength, direction };
}

export const meta = {
  name: "设置磁场",
  parameters: [
    {
      name: "strength",
      type: "number",
      defaultValue: 1.0,
      unit: "T",
      description: "磁场强度"
    },
    {
      name: "direction",
      type: "string",
      defaultValue: "vertical",
      description: "磁场方向",
      options: ["vertical", "horizontal"]
    }
  ]
};